package com.bestcem.xm.om.dao.mapper;

import com.bestcem.xm.om.dao.param.PlatformParamDO;
import com.bestcem.xm.om.entity.OmPlatform;
import com.bestcem.xm.om.grpc.service.param.OmPlatformParam;
import org.apache.ibatis.annotations.Mapper;

import java.util.Collection;
import java.util.List;

/**
 * @author zhangfeng <feng.zhang@idiaoyan.com>
 * @version v1.0
 * @date 2022/3/22 14:52
 */
@Mapper
public interface PlatformMapper {
    /**
     * countByParam
     * @param platformParamDO
     * @return
     */
    Integer countByParam(PlatformParamDO platformParamDO);

    /**
     * listByParam
     * @param param
     * @return
     */
    List<OmPlatform> listByParam(PlatformParamDO param);

    /**
     * findById
     * @param id
     * @return
     */
    OmPlatform findById(String id);

    /**
     * findOneByOrgId
     * @param orgId
     * @return
     */
    OmPlatform findOneByOrgId(String orgId);

    /**
     * insert
     * @param omPlatform
     */
    void insert(OmPlatform omPlatform);

    /**
     * update
     * @param omPlatform
     */
    void update(OmPlatform omPlatform);

    /**
     * findOneByPlatformCode
     * @param platformCode
     * @return
     */
    OmPlatform findOneByPlatformCode(String platformCode);

    /**
     * listByPlatformParam
     * @param param
     * @return
     */
    List<OmPlatform> listByPlatformParam(OmPlatformParam param);

    /**
     * listByStatus
     * @param status
     * @return
     */
    List<OmPlatform> listByStatus(Integer status);

    /**
     * listByCodes
     * @param platformCodes
     * @return
     */
    List<OmPlatform> listByCodes(Collection<String> platformCodes);
}
